<form method="post" name="myform" id="myform" action="">
<div class="admin">
    <div class="panel admin-panel">
        <div class="panel-head">
            <strong>商品分类管理</strong>&nbsp;&nbsp;&nbsp;&nbsp;
            <span>
               <a href="{:U('add')}" class="button button-small border-green">新增</a>
            </span>
        </div>
        <table class="table">
            <tr>
                <th>商品分类名称</th>
                <th>商品分类状态</th>
                <th>商品分类排序</th>
                <th>操作</th>
            </tr>
            <foreach name="arr" item="v">
            <tr>
                <td>{$v['stc_name']}</td>
                <td>
                    <if condition="$v['stc_state'] eq 1">开启<else />关闭</if>
                </td>
                <td>{$v['stc_sort']}</td>
                <td>
                    <a class="button bg-blue button-little" href="{:U('save',array('stc_id'=>$v['stc_id']))}" title="编辑"><i class="icon-edit"></i>编辑</a>
                    <a class="button bg-red button-little js-del" data="{$v['stc_id']}" href="javascript:;" title="删除"><i class="icon-minus-circle"></i>删除</a>
                </td>
            </tr>
            </foreach>
        </table>
    </div>
</div>
</form>
<script type="text/javascript">
    $("#myform").Validform({
        tiptype: 3,
        showAllError:true,
    });
    $('#myform').layer({
        deleteUrl: "del",
    });
</script>